﻿<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title - My ASP.NET MVC Application</title>
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <meta name="viewport" content="width=device-width" />
        @Styles.Render("~/Content/css")
        @Scripts.Render("~/bundles/modernizr")
    </head>
    <body>
        <header>
            <div class="content-wrapper">
                <div class="float-left">
                    <p class="site-title">@Html.ActionLink("your logo here", "Index", "Home")</p>
                    @Html.ActionLink("Mobile view", "SwitchView", "ViewSwitcher", new { mobile = true, returnUrl = Request.Url.PathAndQuery }, new { rel = "external" })
                </div>
                <div class="float-right">
                    <section id="login">
                        @Html.Partial("_LoginPartial")
                    </section>
                    <nav>
                        <ul id="menu">
                            <li>@Html.ActionLink("Home", "Index", "Home")</li>
                            

                           
                            @if (Request.IsAuthenticated)
                            {
                                
                                <li>@Html.ActionLink("Coupon", "Index", "Coupon")</li>
                                
                                if (User.Identity.Name == "admin")
                                {
                                    <li>@Html.ActionLink("User", "Index", "User")</li>
                                }
                                else
                                {
                                    <li>@Html.ActionLink("User", "Edit", "User")</li>
                                }

                                if (User.Identity.Name == "admin")
                                 {
                                    <li>@Html.ActionLink("PromotionType", "Index", "PromotionType")</li>
                                    <li>@Html.ActionLink("Company", "Edit", "Company")</li>
                                    <li>@Html.ActionLink("SalesPromotion", "Index", "SalesPromotion")</li>
                                    <li>@Html.ActionLink("Location", "Index", "Location")</li>
                                    <li>@Html.ActionLink("Visit", "Index", "Visit")</li>
                                    <li>@Html.ActionLink("UserFavorite", "Index", "UserFavorite")</li>
                                 }

                                if (User.IsInRole("RealEstateAgent"))
                                 {
                                     <li>@Html.ActionLink("AgentQRCode", "Edit", "AgentQRCode")</li>   
                                     <li>@Html.ActionLink("HomeForSale", "Index", "HomeForSale")</li>          
                                 }
                            }
                            
                            <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                           
                        </ul>
                    </nav>
                </div>
            </div>
        </header>
        <div id="body">
            @RenderSection("featured", required: false)
            <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
        </div>
        <footer>
            <div class="content-wrapper">
                <div class="float-left">
                    <p>&copy; @DateTime.Now.Year - My ASP.NET MVC Application</p>
                </div>
            </div>
        </footer>

        @Scripts.Render("~/bundles/jquery")
        @RenderSection("scripts", required: false)
    </body>
</html>
